package com.cw.demo.service.impl;

import com.cw.demo.dao.DeptDao;
import com.cw.demo.dao.impl.DeptDaoImpl;
import com.cw.demo.model.Dept;
import com.cw.demo.service.DeptService;

import java.util.List;

public class DeptServiceImpl implements DeptService {

    private DeptDao deptDao = new DeptDaoImpl();

    public boolean saveDept(Dept dept) {
        return deptDao.saveDept(dept);
    }

    public boolean updateDept(Dept dept) {
        return deptDao.updateDept(dept);
    }

    public boolean deleteDept(int id) {
        return deptDao.deleteDept(id);
    }

    public List<Dept> findByParam(Dept param) {
        return deptDao.findByParam(param);
    }
}
